import request from '../common/request'

export function isECDS(params) {
    return request.get({
        url: '/mall/mobile/receipt/qryMerReceiptOpenSts',
        params
    })
}

// 查询用户可以开票的订单
export function getOrders(data) {
    return request.post({
        url: '/mall/mobile/receipt/qryCanReceiptOrd',
        data
    })
}

// 查询发票抬头
export function getInvoiceTitle(data) {
    return request.post({
        url: '/mall/mobile/receipt/qryFapiaoTitle',
        data
    })
}

// 申请开票
export function applyForInvoice(data) {
    return request.post({
        url: '/mall/mobile/receipt/receiptDeal',
        data
    })
}

// 查询发票设置
export function findInvoiceTab(data) {
    return request.get({
        url: '/mall/mobile/receipt/qryFapiaoPreferenceType',
        data
    })
}

// 查询开票历史
export function getHistory(data) {
    return request.post({
        url: '/mall/mobile/receipt/qryFapiaoRecordPage',
        data
    })
}

// 重新发送发票
export function reloadSend(data) {
    return request.post({
        url: '/mall/mobile/receipt/reSendFapiaoEmail',
        data
    })
}

// 发票冲红
export function invoiceReversal(data) {
    return request.post({
        url: '/mall/mobile/receipt/fapiaoToRed',
        data
    })
}

// 重新开票
export function reloadInvoice(data) {
    return request.post({
        url: '/mall/mobile/receipt/reOpenBlueFapiao',
        data
    })
}